<?php
if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/**
 * @author Admin
 *
 *
 */
class SimplifiedImageAdmin extends ImagesAdmin {
	public $maxthumbwidth = 70;
	
	public $maximagewidth = 900;
	
	public $uploadpath = 'uploads/';
	
	public $deletepath = 'uploads';
	/***
	 * The current category
	 */
	protected $cat_ID;
	
	
	
	public $commandPath = "IFrameOperation/SimpleUpload/";
	//TODO - Insert your code here
	/**
	 * constructor
	 */
	public  function __construct( $ci,$cat_id ) {
		// need to load libraries here
		$this->cat_ID = $cat_id;
		$ci->load->library("form_validation");
		parent::__construct($ci);		
		//TODO - Insert your code here
	}
	
	/**
	 * 
	 * Override the default behaviour here
	 */
	protected function GetFormAddress(){
		$category_num = $this->uri->segment(4, 0);
		$page_num = $this->uri->segment(6, 0);
		$this->display->form_address = $this->commandPath.$this->cat_ID;
		$this->display->currentCat = $this->cat_ID;
	}
	/**
	 * 
	 * Starts the ball rolling
	 */
	protected  function getUpload(){
		$this->display->base = "imageAdmin/simplifiedupload";
		if( $this->jobDone )$id = $this->display->ins_id;
		if( !empty( $id )){
		$dat = $this->gallerymodel->getImage( $this->display->ins_id );
		$this->display->uploadImg = $dat; 
		}
		$this->working = false;
	}
	
	/*
	 * Process the upload action
	 */
	protected function doProcess(){
			$this->display->options = $this->category_options;
			$this->display->base = "imageAdmin/simplifiedupload2";
	}
}


?>